package com.example.demo.exception;

import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

@ControllerAdvice
public class ExHandler {

    @ExceptionHandler(IllegalArgumentException.class)
    public ResponseEntity xx(){
        return new ResponseEntity("参数不合法",HttpStatus.BAD_REQUEST);
    }



}
